import openpyxl

wb = openpyxl.load_workbook(r"F:\my_profile\study\code_pub\study_code_pub\python表格\合并单元格\result.xlsx")
print(wb.sheetnames)

sheet = wb.active

print(sheet.merged_cell_ranges) # 返回一个列表，列表中是MergedCellRange对象

print(sheet.merged_cells)
# max_col
# max_row
# min_col
# min_row
# size
# start_cell
# coord
# bounds
# 上下左右的坐标
# top
# left
# bottom
# right



wb.save(filename="result1.xlsx")

